package singleton.staticloader;

/**
 * 静态加载方式
 * 线程安全
 */
public class Singleton {
    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }

    private Singleton() {
    }

    public static final Singleton getInstance() {
        return SingletonHolder.INSTANCE;
    }

    public void show(){
        System.out.println("static loader");
    }
}
